﻿Imports System.Text
Imports Microsoft.VisualStudio.TestTools.UnitTesting

Imports CQRSAzure.Tools

<TestClass()>
Public Class EventModelUnitTest

    <TestMethod()>
    Public Sub Constructor_Empty_TestMethod()

        Dim testObj As New EventModel()
        Assert.IsNotNull(testObj)

    End Sub

    <TestMethod()>
    Public Sub Constructor_Name_TestMethod()

        Dim testObj As New EventModel("name")
        Assert.IsNotNull(testObj)

    End Sub

    <TestMethod()>
    Public Sub Name_RoundTrip_TestMethod()

        Dim expected As String = "ExpectedName"
        Dim actual As String = "ActualName"

        Dim testObj As New EventModel(expected)
        actual = testObj.Name

        Assert.AreEqual(expected, actual)

    End Sub

End Class

<TestClass>
Public Class EventModelEventArgsUnitTest

    <TestMethod>
    Public Sub Constructor_TestMethod()

        Dim testObj As New EventModelEventArgs("TestName")
        Assert.IsNotNull(testObj)

    End Sub

    <TestMethod>
    Public Sub EventName_RoundTrip_TestMethod()

        Dim expected As String = "ExpectedName"
        Dim actual As String = "ActualName"

        Dim testObj As New EventModelEventArgs(expected)
        actual = testObj.EventName

        Assert.AreEqual(expected, actual)

    End Sub

End Class